#ifndef HELPER_H
#define HELPER_H
#include <function.h>
#include <map>
#include "cinterface/ISampler.h"

namespace SPLINTER
{
    double operator<<(Function &spline, double x);

    void plotSpline(const std::vector<double> &x, const std::vector<double> &y, const std::map<std::string, std::string> &keywords = {});

    void plotSpline(Function &spline, double start, double end, const std::map<std::string, std::string> &keywords = {}, int points = 2000);

    void plotSplineTheta(Function &spline_x, Function &spline_y, ISampler &sampler, const std::map<std::string, std::string> &keywords = {}, int points = 2000);

    void subplot(long nrows, long ncols, long plot_number);

    void show();

    DenseVector doubleToDenseVector(double x);

#define len(arr) (sizeof(arr) / sizeof(arr[0]))
}

#endif // HELPER_H